package com.java.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.java.service.LoginService;


@Controller
public class LoginController {
	@Autowired
	private LoginService loginservice;

	/**
	 * 用户登录查询
	 * @param username
	 * @param pwd
	 * @param session
	 * @return
	 */
	@RequestMapping("login")
	public String login(String username, String pwd, HttpSession session) {
		boolean blg = loginservice.login(username,pwd,session);
		return blg ? "index.jsp" : "login.jsp";
	}
}
